﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>图片不间断向上滚动JS代码</title>
</head>
<body>
<div id="demo" style="height:250px;width:232px; overflow:hidden; margin:30px auto;">
<div id="demo1">
<a href="http://www.16sucai.com" target="_blank" title="一流素材网JS代码"><img src="images/01.jpg" border="0" /></a>
<a href="http://www.16sucai.com" target="_blank" title="一流素材网JS代码"><img src="images/02.jpg" border="0"/></a>
<a href="http://www.16sucai.com" target="_blank" title="一流素材网JS代码"><img src="images/03.jpg" border="0"/></a>
<a href="http://www.16sucai.com" target="_blank" title="一流素材网JS代码"><img src="images/04.jpg" border="0"/></a>
<a href="http://www.16sucai.com" target="_blank" title="一流素材网JS代码"><img src="images/05.jpg" border="0"/></a>
</div>
<div id="demo2"></div>
   <script>
   var speed=50
   demo2.innerHTML=demo1.innerHTML
   function Marquee(){
   if(demo2.offsetTop-demo.scrollTop<=0)
   demo.scrollTop-=demo1.offsetHeight
   else{
   demo.scrollTop++
   }
   }
   var MyMar=setInterval(Marquee,speed)
   demo.onmouseover=function() {clearInterval(MyMar)}
   demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
   </script>
</div>
<p style="text-align:center;">代码整理：<a href="http://www.16sucai.com/" target="_blank">一流素材网</a></p>
<p style="text-align:center;">＊尊重他人劳动成果，转载请自觉注明出处！注：此代码仅供学习交流，请勿用于商业用途。</p>
<p></p> 
</body>
</html>
